#pragma once
#include <sstream>


#include <string>

#include "../Object.h"
#include "../SQLExprImpl.h"
#include "../statement/SQLSelect.h"
// #include "../HexBin.h"
#include "SQLLiteralExpr.h"

// import com.alibaba.druid.util.HexBin;
class SQLASTVisitor;

class SQLHexExpr : virtual public SQLExprImpl, virtual public SQLLiteralExpr
{

private:
  string_ptr hex;

public:
  SQLHexExpr(string_ptr hex);
  virtual ~SQLHexExpr();
  SHAREDOBJECT(SQLHexExpr);

  string_ptr getHex();

  void output(std::stringstream *buf);

  // int hashCode();
  // BOOL_ptr equals(Object obj);
  // char[] toBytes();
  //  SQLHexExpr* clone();
  virtual SQLObject_ptr clone();

protected:
  void accept0(SQLASTVisitor_ptr visitor);
};
